package com.hzw.saas.web.storage.param;

import java.io.Serializable;
import javax.validation.constraints.NotBlank;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * @author zzl
 * @since 02/28/2021
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel("复制/移动资源参数")
public class ResourceMoveParam implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 文件/目录ID
     */
    @ApiModelProperty(value = "文件/目录ID", position = 1, required = true)
    @NotBlank(message = "文件/目录ID不可为空")
    private String pid;

    /**
     * 目标父目录ID，根目录ID为对应存储空间ID
     */
    @ApiModelProperty(value = "目标父目录ID，根目录ID为对应存储空间ID", position = 2, required = true)
    @NotBlank(message = "目标父目录ID不可为空")
    private String tarSupId;

    /**
     * 新名称（可选）
     */
    @ApiModelProperty(value = "新名称（可选）", position = 4)
    private String newName;

    /**
     * 是否覆盖同名文件
     */
    @ApiModelProperty(value = "是否覆盖提交，目标父目录存在同名目录/文件时，false-返回409错误，true-同名覆盖", position = 5)
    private Boolean cover;

}
